In U.S. Pat. Nos. 4,452,799; 4,524,206 and 4,590,196 there are described a number of 3-piperazinyl-1,2-benzisoxazoles and -1,2-benzisothiazoles having psychotropic, tranquilizing and analgesic properties. In U.S. Pat. No. 4,804,663 there are described 3-piperidinyl-1,2-benzisoxazoles and -1,2-benzisothiazoles as antipsychotics. In U.S. Pat. No. 4,745,117 and EP-A-0,281,309 there are described piperazinyl derivatives having antipsychotic properties. In EP-A-0,135,781, published Apr. 3, 1985, there are disclosed a number of 3-piperidinyl-indazole derivatives having antipsychotic and analgesic properties. In EP-A-0,302,423 there are described 1-phenyl-3-piperazinyl-1H-indazole derivatives useful as analgesics, anticonvulsants and antidepressants.